% run_maker.m 6/30/2014 Parker MacCready & Sarah Giddings
%
% driver for the code that creates ROMS forcing files
%
% Uses object-oriented programming.

clear all

% set global paths and directories
addpath('../../alpha/'); Tdir = toolstart;

% set local paths required by some methods
addpath run_definitions run_functions

% add user-specific paths
addpath([Tdir.tools 'rtools_user/runs/run_definitions']);

disp('**********************************')

gname = 'salish14'; % defines the grid to use
tag1 = 'base'; % indicate which scenario to use
tag2 = '2005'; % an additional tag, e.g. to denote the time interval

Tdir.base_year = str2num(tag2);

% and this is the actual time interval
if 0 % a full year
    tdlims = [datenum(Tdir.base_year,1,1,0,0,0), ...
        datenum(Tdir.base_year+1,1,1,0,0,0)];
else % testing
    tdlims = [datenum(Tdir.base_year,3,17,0,0,0), ...
        datenum(Tdir.base_year,3,22,0,0,0)];
end

% initial creation of the run object
%
eval(['rn = ',gname,'_',tag1,';']);

rn.addInfo(Tdir,gname,tag1,tag2,tdlims);

rn.makeDir;

rn.addGrid;

rn.setScoord;

rn.makeS;

rn.makeClim;

rn.makeAtm;

rn.makeTide;

rn.makeRivers;

rn.addDye;
